<template>
  <div>
    <!-- <router-link to="/App">
      <span>登陆</span>
    </router-link> -->
    <router-link :to="{name:'App'}">
      <!-- <span>登陆</span> -->
      <button>登陆</button>
    </router-link>
    <!-- <router-view></router-view> -->
    <!-- <button @click="login">登陆</button> -->
  </div>
</template>
<script>
import { loginApi } from "../../api/login";
export default {
  data() {
    return {};
  },
  mounted() {},
  methods: {
    login() {
      let that = this;
      loginApi.login(o => {
        console.log(o);
        that.$router.push("/main");
        // if(o){
        //     this.$router.push('/login');
        // }
        localStorage.setItem("accessToken", o);
      });
    }
  }
};
</script>
<style>
</style>
